import request from "@/utils/request";
import { download, downloadOfGet } from "@/utils/request";

// 测点 -列表
export function getPointListByDeviceCode(params) {
  return request({
    url: "/point/getPointListByDeviceCode",
    method: "get",
    params,
  });
}
// 测点 -新增 / 修改
export function addPoint(data) {
  return request({
    url: "/point/submit",
    method: "post",
    data,
  });
}
// 测点 -删除
export function deletePoint(ids) {
  return request({
    url: "/point/" + ids,
    method: "delete",
  });
}

// 故障模式 -列表
export function getFaultModeListByDeviceCode(params) {
  return request({
    url: "/EquipFaultMode/EquipFaultModeDevice/list",
    method: "get",
    params,
  });
}
// 故障模式 - 编辑后保存
export function editFaultMode(data) {
  return request({
    url: "/EquipFaultMode/EquipFaultModeDevice",
    method: "put",
    data,
  });
}
